/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(120deg, #3498db, #8e44ad);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 登录容器 */
.login-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 400px;
    padding: 40px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
}

/* 标题样式 */
.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    position: relative;
}

.login-container h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #8e44ad);
    border-radius: 3px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.form-group label {
    width: 80px;
    color: #555;
    font-weight: bold;
    margin-right: 10px;
}

.form-group input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.form-group input.invalid {
    border-color: #e74c3c;
}

/* 错误提示样式 */
.error-message {
    color: #e74c3c;
    font-size: 14px;
    width: 100%;
    margin-left: 90px; /* 与label宽度和margin相匹配 */
    margin-top: 5px;
    display: none;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #3498db, #8e44ad);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
    font-weight: bold;
}

.btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        width: 90%;
        padding: 20px;
    }
    
    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-group label {
        margin-bottom: 5px;
    }
    
    .error-message {
        margin-left: 0;
    }
}